{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 2,
   "metadata": {},
   "outputs": [],
   "source": [
    "from rdkit import Chem\n",
    "from rdkit.Chem import Draw\n",
    "from rdkit.Chem import AllChem\n",
    "from rdkit.Chem.Draw import IPythonConsole"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "from psikit import Psikit"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAIAAADCEh9HAAAABmJLR0QA/wD/AP+gvaeTAAANbElEQVR4nO3dfUzU9wHH8c8hD6JUBJ2KWm1RUQvFqi0aXatVNK1lZn/oH8ayOdtonRVQRFR8VgyVtd7FSmOXaV1sslWXLGJ8iA8ZTbWFTA0+JBBaRQdjKBXDAHm82x9nrDpTwS/cj4P367/+uMt9/jDv/u5+8Duby+USAOBZ+Vg9AAC8GxlFx1BTo3PndPWqmputngK0DhmF1YqLNXGigoM1ebKiohQUpHnzVFNj9SygpWx8NgorFRQoNlalpXr/fc2cqepqffmlTp/W2LE6c0a9e1u9D3g6MgpLzZqlY8f0xRf67W/vH2lu1sKF+vOflZ6utWstHQe0CBmFdb7/XhERmjFDJ048cryyUsOGqVcvFRdbMwxoDT4bhXXOn5fLpXnzHj8eEqJp03TjhmprrZgFtA4ZhXWuX5ek8PAn/GjIEEkqK/PoHuCZkFFYJzRU0pMvypeXy2bTwIEeXgQ8AzIK60RESNK33z5+vLFROTkaOlSBgZ4fBbQWGYV1Jk1SeLh27VJJySPHd+9WaamWLbNoFtA6XKmHpf7+d82Zo9BQrV+v6GjV1enYMTkciolRTo66d7d6H/B0ZBSedeiQ7t3T3Lk/JfKbb7RggX744f5/BgRowQI5HAoI+OlZp0/r3/9WbKzCwjw9GHgaMgrP6t9ft27pP/9R//6PHC8r05Ur6tdPkZHy9X38WTNn6uRJnTihmTM9thRoof/79wpYIiy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ISkpGRcenSJRrqHVasUGmpvvhCf/yj5s7V736nEyf0m9/o4kVlZVk9Dm2Gz0Y7NJfLNWbMmMuXL/v6+i5evHjz5s19+vSxehRa5vvvFRGhGTN04sQjxysrNWyYevVScbEGDFBkpE6ffuQBo0crMFAXLnhyLEzwpr5Ds9lsKSkp+/bts9vt0dHRVs9Ba5w/L5dL8+Y9fjwkRNOm6W9/U22tJFVU6MiRRx7w3/8qMNBDI9EWyGhH9+6778bHx1u9Aq13/bokPfHrrYYMkaSyMkm6dEm/+tXjD+jXr12noW2R0Y6OP4r3VqGhkn66KP+w8nLZbBo4UJImTdJf//rIT6dObfdtaFNkFGgfERGS9O23evvtR443NionR0OH3n/n3r27Bg9+5AF+fp6aiLbBlXqgfUyapPBw7dqlkpJHju/erdJSLVtm0Sy0Pc5Ggfbh76+PP9acORo3TuvXKzpadXU6dkwOh2Ji9PvfW70PbYaMAu3m17/WP/6hBQuUkHD/SECAFi+Ww3H/5k822xO+zemJB9GB/Q+IqeGfq13VbwAAAABJRU5ErkJggg==\n",
      "text/plain": [
       "<rdkit.Chem.rdchem.Mol at 0x112bc4620>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "smi = 'CC(=O)O'\n",
    "mol = Chem.MolFromSmiles(smi)\n",
    "AllChem.Compute2DCoords(mol)\n",
    "mol"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimizer: Optimization complete!\n",
      "CPU times: user 21.9 s, sys: 996 ms, total: 22.9 s\n",
      "Wall time: 6.31 s\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "-227.82082530457998"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# load smiles and perform optimzation\n",
    "pk = Psikit()\n",
    "pk.read_from_smiles(smi)\n",
    "%time pk.optimize()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-0.447525061770846 HOMO\n",
      "0.19145171932070656 LUMO\n"
     ]
    }
   ],
   "source": [
    "print('{} HOMO'.format(pk.HOMO))\n",
    "print('{} LUMO'.format(pk.LUMO))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[]\n"
     ]
    }
   ],
   "source": [
    "# Get Atoms from pk.mol object and check atom properties\n",
    "atoms = pk.mol.GetAtoms()\n",
    "print(list(atoms[0].GetPropNames()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "metadata": {},
   "outputs": [],
   "source": [
    "charges = pk.resp_charge"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "['EP_C', 'RESP_C']\n"
     ]
    }
   ],
   "source": [
    "atoms = pk.mol.GetAtoms()\n",
    "print(list(atoms[0].GetPropNames()))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAIAAADCEh9HAAAABmJLR0QA/wD/AP+gvaeTAAARAUlEQVR4nO3da0xU19oH8GcPM9xvIyCMXGoNFJRqqaBgq9YLrU2rMalim1Js2uJ8E+0xDU16ktHYE2nTRl4T285pegziQR1Mmppz7DmKtVpUKiqtCiI1LTICDvf7cJmZdT5sRPAFqgzM2pv9/30yS9n7EfXvs9Zea4/AGCMAAJgoFe8CAADkDTEKAOAUxKjS1dfXz507t7y8fGjEZDItWbKEY0kA8oIYVTqbzVZZWdnd3T000tbWVlVVxbEkAHlBjAIAOEXNuwCQhKtXr/b29oo/RisK8FgEbHhSOLPZHBUV5efnp1YP/p/a19fn6enZ3NzMtzAAucCkHoi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oFCIUZCtjg66eZOiokin410KKNr/ADK/0AxjCzaXAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<rdkit.Chem.rdchem.Mol at 0x10d11dc00>"
      ]
     },
     "execution_count": 10,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pk.mol"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [],
   "source": [
    "from rdkit.Chem.Draw import MolDrawOptions\n",
    "from rdkit.Chem.Draw import rdMolDraw2D\n",
    "from IPython.display import SVG"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "metadata": {},
   "outputs": [],
   "source": [
    "view = rdMolDraw2D.MolDraw2DSVG(600,800)\n",
    "op = view.drawOptions()\n",
    "for idx, atom in enumerate(pk.mol.GetAtoms()):\n",
    "    num = float(atom.GetProp('RESP_C'))\n",
    "    op.atomLabels[idx] = \"{}({:,.2f})\".format(atom.GetSymbol(), num)\n",
    "AllChem.Compute2DCoords(pk.mol)\n",
    "view.DrawMolecule(pk.mol)\n",
    "view.FinishDrawing()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/svg+xml": [
       "<svg baseProfile=\"full\" height=\"800px\" version=\"1.1\" width=\"600px\" xml:space=\"preserve\" xmlns=\"http://www.w3.org/2000/svg\" xmlns:rdkit=\"http://www.rdkit.org/xml\" xmlns:xlink=\"http://www.w3.org/1999/xlink\">\n",
       "<rect height=\"800\" style=\"opacity:1.0;fill:#FFFFFF;stroke:none\" width=\"600\" x=\"0\" y=\"0\"> </rect>\n",
       "<path d=\"M 348.052,405.509 315.114,395.716\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 398.501,420.509 431.439,430.303\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 371.047,420.509 350.713,488.897\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 375.506,405.509 395.84,337.122\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 296.558,378.694 288.239,343.887\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 288.239,343.887 279.921,309.081\" style=\"fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 279.635,382.738 271.317,347.932\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 271.317,347.932 262.999,313.125\" style=\"fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 281.969,395.716 258.306,418.125\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 258.306,418.125 234.643,440.534\" style=\"fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 201.499,440.534 185.03,435.638\" style=\"fill:none;fill-rule:evenodd;stroke:#FF0000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<path d=\"M 185.03,435.638 168.561,430.741\" style=\"fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:2px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1\"/>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000\" x=\"340.26\" y=\"420.509\"><tspan>C(-0.33)</tspan></text>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000\" x=\"259.871\" y=\"395.716\"><tspan>C(0.84)</tspan></text>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000\" x=\"236.147\" y=\"311.103\"><tspan>O(-0.62)</tspan></text>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#FF0000\" x=\"193.203\" y=\"455.534\"><tspan>O(-0.66)</tspan></text>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000\" x=\"426.646\" y=\"445.303\"><tspan>H(0.10)</tspan></text>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000\" x=\"318.465\" y=\"503.897\"><tspan>H(0.10)</tspan></text>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000\" x=\"368.052\" y=\"337.122\"><tspan>H(0.11)</tspan></text>\n",
       "<text style=\"font-size:14px;font-style:normal;font-weight:normal;fill-opacity:1;stroke:none;font-family:sans-serif;text-anchor:start;fill:#000000\" x=\"113.318\" y=\"430.741\"><tspan>H(0.45)</tspan></text>\n",
       "</svg>"
      ],
      "text/plain": [
       "<IPython.core.display.SVG object>"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "svg = view.GetDrawingText().replace('svg:', '')\n",
    "SVG(svg)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAcIAAACWCAIAAADCEh9HAAAABmJLR0QA/wD/AP+gvaeTAAAeVElEQVR4nO3da1RTZ7oH8CckAQkIyFWwQlUGL1SBRiKQIIhG5CLVYq1t5ViO9XSqTnVabac4nU67qu14nKW2dUZPF221ltHRKjdBSBUouRyFyEURUaqgglwVBMItl/Nhc0LUVhJy2dnJ81v9Invv5N+14Fnvu/e7n5emUqkAIYTQeNmQHQAhhKgNyyhCCOkFyyhCCOkFyyhCCOkFyyhCZqS3t1ehUJCdAumGQXYAhKxdc3OzSCQSCoVSqbSsrGz79u2BgYGvvPIK2bmQtmi44AkhExsYGJBKpRKJRCwWSySSlpYW9SEGg6FQKBgMRlZWVlxcHIkhkfawjCJkCvfu3SsvL1ePOgcGBtSHnJ2dQ0NDuVwuj8eLiIj45JNP/va3v9nb2xcUFERGRpKYGWkJyyhCRqFQKK5du6aum1evXtU8On36dKJucrncOXPm0Gg09SGVSvXmm29+/fXXzs7ORUVFISEhJs+OdINlFCGDefjw4cWLF4m6WVpa2t3drT7k6OgYFBRE1E0ul+vq6vqUz1EoFK+88sqJEyc8PT1LS0sDAgKMnx2NH5ZRhPRy8+ZNoVBIjDpra2s1/6C8vb2Jusnj8UJCQmxsdFgYMzQ0lJSUVFBQMH36dKFQ6O3tbYTsyDCwjCKkm97e3srKSqJuSiSSzs5O9SEWixUSEsJms3k8XnR0tIeHhz5fJJPJ+Hy+WCyeO3ducXHx0wewiERYRhEam+aapIsXLw4PD6sPeXt7E3WTy+WGhoba2dkZ8Hs7OjqioqKuXr0aFhb2008/OTg4GPDDkaFgGUXoVwwPD1dXVxOz9ZKSkra2NvUhBoMREBBA1M3IyMhp06YZNUlTUxOPx2toaODz+bm5uba2tkb9OjQOWEYRGqG5Jqm8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dR+6NEu7fh1mzoL0dIiLw3qjh4WgUWRfN9iVOTk6kty9pbgapdGTUWV4OGgv5wcsLQkNHR506LeSn0R7pb+LqCvv2wWuvGb7pCQIcjSLrRGL7kuFhuHQJJBIQi0Eigbt3Rw/R6TB3LnC5EB4O4eEwfbopc6HxwzKKrJGJ25d0d3eXlZUR7903NXXW1l5SH5o4ERYsGO2ShxtFUxGWUWSl1O1LpkyZIhQKDds3RKFQ1NTUiEQiiUQikUjq6+vVh2xsbObPv//cc87EqHPWLNynk/KwjCLr1d/fHxcXV1JSYpD2JT09PVVVVeoueQ8ePFAfcnBwCA4OJt6AWrRokbu7u97ZkRnBMoqsmmb7kpKSEhcXF50uv3nzplAoJLo9aXYXBQBvb2+iWQmbzeZwOLa2tobOjswFllFk7dTtS6Kjo/Pz8ydMmPCUk2Uy2aVLl4i6WVxc3N7erj6k2V00KirKz8/P+NmRWcAyihDcuXOHx+Pdvn17+fLlT7Yv0bK7KI/He3oJRpYKyyhCAAA1NTVRUVGdnZ1r165NT0+/fPkyMVsvLS1taGhQn0Z0F1XP1gOJZkrIumEZRWjEhQsXFi9e3NfXZ2trOzQ0pP65m5tbeHg40V00NDTUAXfXRI/CMorQqMLCwqKios8//3z69OlcLpcYdc6ePdusOjwhc4NlFKHHdXd3Ozs7k50CUQaWUYQQ0gtOVRBCSC9YRhFCSC9YRhFCSC9YRhFCSC//B02h9KMCnJ8ZAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<rdkit.Chem.rdchem.Mol at 0x110ea9080>"
      ]
     },
     "execution_count": 4,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "smi = 'COc1cccnc1'\n",
    "mol = Chem.MolFromSmiles(smi)\n",
    "AllChem.Compute2DCoords(mol)\n",
    "mol"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Optimizer: Optimization complete!\n",
      "CPU times: user 1min 54s, sys: 3.97 s, total: 1min 58s\n",
      "Wall time: 31.5 s\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "-360.58490537900167"
      ]
     },
     "execution_count": 5,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "pk = Psikit()\n",
    "pk.read_from_smiles(smi)\n",
    "%time pk.optimize()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Done!\n"
     ]
    }
   ],
   "source": [
    "# get MO view!\n",
    "pk.getMOview()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.6.6"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
